package top.malegod.service;

import top.malegod.model.Comments;
import top.malegod.model.Order;
import top.malegod.utils.ServerResponse;

/**
 * Create by IntelliJ IDEA
 *
 * @author: AbelEthan
 * @date-Time: 2018/5/23 13:46
 * @description: 订单service接口
 */
public interface OrderService {

  /**
   * 获取正在进行订单service层操作
   * @param userId
   * @return
   */
  ServerResponse<Order> getUnpaidOrder(String userId);

  /**
   * 获取订单详细信息
   * @param userId
   * @param id
   * @return
   */
  ServerResponse<Order> findOrder(String userId, String id);

  /**
   * 获取所有订单
   * @param userId
   * @return
   */
  ServerResponse<Order> findAllOrder(String userId);

  /**
   * 创建订单service层操作
   * @param order
   * @return
   */
  ServerResponse createOrder(Order order);

  /**
   * 取消订单
   * @param id
   * @param userId
   * @return
   */
  ServerResponse cancelOrder(String id, String userId);

  /**
   * 删除订单
   * @param id
   * @return
   */
  ServerResponse deleteOrder(String id);

  /**
   * 评论订单
   * @param comments
   * @return
   */
  ServerResponse commentsOrder(Comments comments);

  /**
   * 进行中的订单
   * @param userId
   * @return
   */
  ServerResponse<Order> getOngoingOrder(String userId);

    /**
     * 未接订单
     * @param userId
     * @return
     */
    ServerResponse<Order> getOpenOrder(String userId);
}
